package com.zhenwei.zscm.model.vo.shipping;

import com.zhenwei.zscm.common.annotations.Insert;
import com.zhenwei.zscm.common.annotations.Update;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class ShippingVO {
    @NotEmpty(message = "主键ID不能为空", groups = { Update.class })
    private String guid;
    /**
     * 系统订单号
     */
    @NotEmpty(message = "订单编号不能为空", groups = { Insert.class })
    private String orderNumber;

    /**
     * PO订单号
     */
//    @NotEmpty(message = "PO订单号不能为空", groups = { Insert.class, Update.class })
    private String poNumber;

    /**
     * 采购主体id
     */
    @NotEmpty(message = "采购主体不能为空", groups = { Insert.class, Update.class })
    private String purchaseCompanyCode;

    /**
     * 采购主体
     */
    @NotEmpty(message = "采购主体不能为空", groups = { Insert.class, Update.class })
    private String purchaseCompany;

    /**
     * 联系人
     */
    @NotEmpty(message = "联系人不能为空", groups = { Insert.class, Update.class })
    private String contactor;

    /**
     * 联系人电话
     */
    @NotEmpty(message = "联系电话不能为空", groups = { Insert.class, Update.class })
    private String telephone;

    /**
     * 联系地址
     */
    @NotEmpty(message = "联系地址不能为空", groups = { Insert.class, Update.class })
    private String address;

    /**
     * 物流公司ID
     */
    @NotEmpty(message = "物流公司不能为空", groups = { Insert.class, Update.class })
    private String logisticsCompanyCode;

    /**
     * 物流公司
     */
    @NotEmpty(message = "物流公司不能为空", groups = { Insert.class, Update.class })
    private String logisticsCompany;

    /**
     * 物流编号
     */
    @NotEmpty(message = "物流编号不能为空", groups = { Insert.class, Update.class })
    private String logisticsNumber;

    /**
     * 出货日期
     */
    @NotNull(message = "出货日期不能为空", groups = { Insert.class, Update.class })
    private Date shippingDate;

    @NotEmpty(message = "物料信息不能为空", groups = { Insert.class, Update.class })
    @Valid
    private List<ShippingMaterialVO> shippingMaterials;
}
